-- @owner: @yangyixiang
-- @date: 2022/10/28
-- @testpoint: 在事务中使用select into，rollback后查询新建的表，合理报错

--step1: 建表; expect: 成功
drop table if exists t_select_into_0085_1;
create table t_select_into_0085_1 (id int,c_clob varchar(10));

--step2: 插入数据; expect: 成功
insert into t_select_into_0085_1 values(1,'a');
insert into t_select_into_0085_1 values(1,'b');
insert into t_select_into_0085_1 values(1,'c');
insert into t_select_into_0085_1 values(1,'d');

--step3: 在事务中rollback后撤销新建的表; expect: 成功
begin;
select * into t_select_into_0085_2 from t_select_into_0085_1;
rollback;
/

--step4: 查询新建表; expect: 失败
select * from t_select_into_0085_2;

--step5: 清理环境; expect: 成功
drop table if exists t_select_into_0085_1;